<?php
/**
 * Created by PhpStorm.
 * User: wx:wenyi2048
 * Date: 2022/3/31 0031
 * Time: 17:07
 */

namespace app\admin\controller\mk;
/*服务保障*/

use app\admin\Controller;
use app\common\service\OptionsService;
use think\Config;
use think\Db;
use think\Loader;


\think\Loader::import('controller/Controller', \think\Config::get('traits_path'), EXT);


class Services extends Controller
{
    use \app\admin\traits\controller\Controller;

    public function index()
    {
        $sService = new OptionsService();
        $sService->searchPage($this->view,$this->request->param());
        return $this->view->fetch();
    }

    public function saveOrder()
    {
        // 插入
        $param = $this->request->param();
        $options = @$param['sort'];
        $oService = new OptionsService();
        $ret = $oService->setService($options);
        if($ret){
            return ajax_return_adv('添加成功');
        }
        return ajax_return_adv_error('添加失败');
    }
}